import behaviors from "../../../../config/behaviors";

Component({
  behaviors: [behaviors],
  properties: {
    image: Object,
    category: Array,
    swiper: Array
  },
  data: {
    nav_height: '',
    nav_top: '',
    min_height: ''
  },
  methods: {},
  lifetimes: {
    ready() {
      wx.getSystemInfo({
        success: (res) => {
          // console.log(res)
          let h = 48
          if (res.system.indexOf('IOS') > -1) {
            h = 44
          }
          // statusBarHeight 状态栏的高度，单位px
          this.setData({
            // nav_height: (res.statusBarHeight + 44)+ 'px',
            nav_height: (res.statusBarHeight + h)+ 'px',
            // nav_top: (res.statusBarHeight)+ 'px',
            nav_top: (0)+ 'px',
            min_height: (res.statusBarHeight + h) * 2 + 430 + 'rpx',
          })
        }

      })



    }
  }
});
